

---
title: "Replication Archive README"
output: pdf_document
---

# Replication archive for "Media and Intraparty Ideological Movements: How Fox News Built the Tea Party"

This repository contains replication materials for Li and Martin (2025), "Media and Ideological Movements: How Fox News Built the Tea Party".

## Proprietary data note 

Some analyses rely on data sets licensed by the authors from vendors. To access these files, users will need to contact the relvant vendor for licensing information. These datasets are:

- Nielsen channel position (FOCUS) and local ratings (NLTV) data. There are several files derived from proprietary Nielsen data on which several scripts rely, which are excluded from the archive:
    - `data/cable_county.rds`
    - `data/cable_zip.rds`
    - `data/nielsen_ratings_2010_primary.rds`
    - `data/nielsen_ratings.rds`
    - `data/zip_2sls_data.RData`
    - `data/DMA-zip.csv`
- GfK / Mediamark Survey of the American Consumer, used in analysis of the first stage channel position effect (Appendix Tables C.1 and C.2). Scripts using these reference the `data/gfk` subfolder, which is excluded from the archive.
- Cable transcripts from Lexis-Nexis. Scripts using these reference the `data/transcripts` folder, also excluded from the archive.
    

## Contents

- `data/` - Contains datasets used in the analysis
- `scripts_content_analysis/` - R scripts for content analysis
- `scripts_channel_pos_analysis/` - R scripts for regressions involving channel position
- `output/` - Generated intermediate data files

## Software requirements
- R version 4.5 or higher
- Required packages:
    - `broom`
    - `cobalt`
    - `data.table`
    - `distrom`
    - `doMC`
    - `fixest`
    - `ggplot2`
    - `ggthemes`
    - `glue`
    - `gt`
    - `haven`
    - `lmtest`
    - `lubridate`
    - `magrittr`
    - `MASS`
    - `plm`
    - `quanteda`
    - `readr`
    - `stargazer`
    - `stm`
    - `stopwords`
    - `stringr`
    - `tidyverse`
    - `tokenizers`
    - `xtable`

## Figure and Table Directory Guide

This section indicates which subdirectory generates each table and figure in the paper.

### Content Analysis (`scripts_content_analysis/`)

The subfolder `scripts_content_analysis/` contains code to run content analyses of cable news transcripts. See README-content.Rmd in this folder for details.

**Main Manuscript Figures:**

- **Figure 1a**: Fraction of words spoken by Tea Party-affiliated candidates on each cable channel over time.
- **Figure 1b**: Fraction of words spoken by mainstream Republican candidates on each cable channel over time.
- **Figure 2a**: Topic weights for candidates (Tea Party topics).
- **Figure 2b**: Topic weights for channels (Tea Party topics).
- **Figure 3a**: Tea Party language score using Gentzkow-Shapiro-Taddy method.
- **Figure 3b**: Republican language score using Gentzkow-Shapiro-Taddy method.

**Main Manuscript Tables:**

- **Table 1**: Structural Topic Model topics emphasized by Tea Party candidates.
- **Table 2**: Structural Topic Model topics emphasized by mainstream Republican candidates.

**Appendix Figures:**

- **Figure B.1.1a**: Fraction of words spoken by Tea Party-affiliated candidates on each cable channel over time, with confidence intervals.
- **Figure B.1.1b**: Fraction of words spoken by mainstream Republican candidates on each cable channel over time, with confidence intervals.
- **Figure B.2.1a**: Candidate topic weights for mainstream Republican topics.
- **Figure B.2.1b**: Channel topic weights for mainstream Republican topics.
- **Figure B.3.1a**: Tea Party language score confidence intervals.
- **Figure B.3.1b**: Republican language score confidence intervals.
- **Figure D.1.1**: Count of mentions of the phrase "Tea Party" on cable channels.
- **Figure I.1**: Count of mentions of the phrase "Occupy" on cable channels.

### Channel Position Analysis (`scripts_channel_pos_analysis/`)

The subfolder `scripts_channel_pos_analysis/` contains code to run regressions involving Fox News channel position. See README-channel-pos.Rmd in this folder for details.

**Main Manuscript Tables:**

- **Table 3**: Effect of Exposure to Fox News On Tea Party Rally Size.
- **Table 4**: Effects of Tea Party Rally Size on Subsequent FNC Ratings (OLS).
- **Table 5**: FNC Effect on Zip Code-Level Total Itemized Contributions In Dollars.
- **Table 6**: Zip-Code Itemized Contributions (In Dollars) to Tea Party Candidates Among Existing vs. New Contributors.
- **Table 7**: Zip-Code Itemized Contributions (In Dollars) to Tea Party Candidates Across Existing Contributors.
- **Table 8**: Zip-Code Itemized Contributions (In Dollars) to Tea Party Candidates Across Existing Republican Contributors.
- **Table 9**: Exposure to Fox News Increased Precinct Primary Vote Shares for Tea Party Candidates.

**Appendix Tables:**

- **Table A.1**: Balance Test: Demographic Differences by Matched Precinct-Level Election Data Availability.
- **Table C.1.1**: FNC Channel Positions on Cable Viewership (Extensive Margin).
- **Table C.2.1**: FNC Channel Positions on Cable Viewership (Intensive Margin).
- **Table C.2.1**: FNC Channel Positions on Cable Viewership (Extensive Margin), Heterogeneity by Respondent Attributes.
- **Table C.2.2**: FNC Channel Positions on Cable Viewership (Intensive Margin), Heterogeneity by Respondent Attributes.
- **Table D.3.1**: Effects of Tea Party Rally Size on Subsequent FNC Ratings (2SLS).
- **Table E.1**: No Evidence of Strategic Entry of Tea Party Candidates Based on Congressional District-Level Fox News Density.
- **Table E.2**: No Evidence of Strategic Entry of Tea Party Candidates Based on Congressional District-Level Weighted Average Fox News Channel Position.
- **Table G.1.1**: FNC Effect on Zip Code-Level Total Itemized Contributions In Dollars (for Oster Ratio Calculation).
- **Table G.3.1**: FNC Effect on Zip Code-Level Total Number of Itemized Contributors.
- **Table G.4.1**: Stacked Regressions Comparing Zip Code-Level Total Itemized Contribution to Tea Party vs. Non-Tea Party Republican Candidates.
- **Table G.5.1**: FNC Effect on Zip Code-Level Total Itemized Contributions to Democratic Candidates.
- **Table G.5.2**: FNC Effect on Zip Code-Level Total Number of Itemized Contributors to Democratic Candidates.
- **Table G.6.1**: Itemized Contributions In Dollars From Existing Contributors (for Oster Ratio Calculation).
- **Table G.6.2**: Itemized Contributions In Dollars From New Contributors (for Oster Ratio Calculation).
- **Table G.8.1**: Zip-Code Itemized Contributions (By Total Number of Contributors) to Tea Party Candidates Among Existing vs. New Contributors.
- **Table G.9.1**: Itemized Contributions In Dollars From The 1st Tercile of (All) Donor Ideology (for Oster Ratio Calculation).
- **Table G.9.2**: Itemized Contributions In Dollars From The 2nd Tercile of (All) Donor Ideology (for Oster Ratio Calculation).
- **Table G.9.3**: Itemized Contributions In Dollars From The 2nd Tercile of (All) Donor Ideology (for Oster Ratio Calculation).
- **Table G.11.1**: Itemized Contributions In Dollars From The 1st Tercile of (Republican) Donor Ideology (for Oster Ratio Calculation).
- **Table G.11.2**: Itemized Contributions In Dollars From The 2nd Tercile of (Republican) Donor Ideology (for Oster Ratio Calculation).
- **Table G.11.3**: Itemized Contributions In Dollars From The 2nd Tercile of (Republican) Donor Ideology (for Oster Ratio Calculation).
- **Table G.13.1**: Zip-Code Itemized Contributions (By Total Number of Contributors) to Tea Party Candidates Across Existing Contributors.
- **Table G.13.2**: Zip-Code Itemized Contributions (By Total Number of Contributors) to Tea Party Candidates Across Existing Republican Contributors.
- **Table H.1.1**: Tea Party Cand. Vote Share (for Oster Ratio Calculation).
- **Table H.3.1**: FNC Effects on Turnout (Share of Age-Eligible Population) in Republican Primaries.

**Appendix Figures:**

- **Figure D.2.1**: Positive Association between Tea Party Rally Sizes and Pre-Rallies Average FNC Primetime Rating Across Counties.
- **Figure G.2.1**: Residualized Scatter Plot For Table 9, Column 2.
- **Figure G.7.1**: Residualized Scatter Plot For Table 6, Column 3.
- **Figure G.7.2**: Residualized Scatter Plot For Table 6, Column 6.
- **Figure G.10.1**: Residualized Scatter Plot For Table 7, Column 3.
- **Figure G.10.2**: Residualized Scatter Plot For Table 7, Column 6.
- **Figure G.10.3**: Residualized Scatter Plot For Table 7, Column 9.
- **Figure G.12.1**: Residualized Scatter Plot For Table 8, Column 3.
- **Figure G.12.2**: Residualized Scatter Plot For Table 8, Column 6.
- **Figure G.12.3**: Residualized Scatter Plot For Table 8, Column 9.
- **Figure H.2.1**: Residualized Scatter Plot For Table 9, Column 2.

